package adpater;

import android.content.Context;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.PagerAdapter;

import java.util.List;

import entity.Animation;
import fragment.LaunchFragment;

public class LaunchImproveAdapter extends FragmentPagerAdapter {
    private int[]imgarray;

    public LaunchImproveAdapter(@NonNull FragmentManager fm,int []arr) {
        super(fm,BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
        this.imgarray = arr;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return LaunchFragment.newInstance(imgarray.length,position,imgarray[position]);
    }

    @Override
    public int getCount() {
        return imgarray.length;
    }
}
